package com.server;

import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

import com.interf.Constant;

public class ServerMain {

	public static void main(String[] args) {
		
		// Create security manager, get file from D:/this.policy
		if (System.getSecurityManager() == null) {
			System.setSecurityManager(new SecurityManager());
		}
		
		try {
			RemoteRequester rrequester = new RemoteRequester();
			Registry registry = LocateRegistry.createRegistry(Constant.RMI_PORT);
			registry.bind(Constant.RMI_ID, rrequester);
			System.out.println("Server is running ...");
		} catch (Exception e) {
			e.printStackTrace();
			System.out.println("Still running....");
		}

	}

}
